BEGIN{print("--begin output--")}
     a(a|b|c)* {substring(1,EOL); insert(EOL,a)}
     b(a|b|c)* {replace(a,b)}
     for(3) {
        aab {replace(c,a)}
        cc  {print("helloworld")}
            {print("hurray")}
     }
     while( a(a|b|c)* ) {
     	aab {replace(c,a)}
        cc  {print("helloworld")}
            {print("hurray")}
     }
     c(a|b|c)* {replace(a,c)}
               {print(LINE)}
END{print("--end output--")}
